<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        h2[title]{
            color: aquamarine
        }
        h2[name~="second"]{
            color: blueviolet
        }
        /* 
            选择器
         */
    </style>
</head>
<body>
    
    <h2 title="h2_title" name="first">this is h2.</h2>
    <h2 name="second title">this is another h2.</h2>
</body>
</html>